package com.lucker.ds.model;

import java.util.Date;

/**
 * cai_piao_simulation_detail
 * @author 
 */
public class CaiPiaoSimulationDetail extends BaseValueObject {
    private Long id;

    /**
     * 方案ID
     */
    private Long planId;

    /**
     * 长期号
     */
    private String fullIssueNo;

    /**
     * 开奖号码
     */
    private String openCode;

    /**
     * 状态 已追  待追  已取消 已中奖
     */
    private String status;

    /**
     * 当前倍数
     */
    private Integer currBetMultiple;

    /**
     * 累计投入
     */
    private Long investment;

    /**
     * 中奖金额
     */
    private Long betBonus;

    /**
     * 开奖时间
     */
    private Date openTime;

    /**
     * 理论最小中奖金额
     */
    private Integer minBonus;

    /**
     * 理论最大中奖金额
     */
    private Integer maxBonus;

    /**
     * 当期投入
     */
    private Integer currentMoney;

    private String customQuerySqlText = null;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPlanId() {
        return planId;
    }

    public void setPlanId(Long planId) {
        this.planId = planId;
    }

    public String getFullIssueNo() {
        return fullIssueNo;
    }

    public void setFullIssueNo(String fullIssueNo) {
        this.fullIssueNo = fullIssueNo;
    }

    public String getOpenCode() {
        return openCode;
    }

    public void setOpenCode(String openCode) {
        this.openCode = openCode;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getCurrBetMultiple() {
        return currBetMultiple;
    }

    public void setCurrBetMultiple(Integer currBetMultiple) {
        this.currBetMultiple = currBetMultiple;
    }

    public Long getInvestment() {
        return investment;
    }

    public void setInvestment(Long investment) {
        this.investment = investment;
    }

    public Long getBetBonus() {
        return betBonus;
    }

    public void setBetBonus(Long betBonus) {
        this.betBonus = betBonus;
    }

    public Date getOpenTime() {
        return openTime;
    }

    public void setOpenTime(Date openTime) {
        this.openTime = openTime;
    }

    public Integer getMinBonus() {
        return minBonus;
    }

    public void setMinBonus(Integer minBonus) {
        this.minBonus = minBonus;
    }

    public Integer getMaxBonus() {
        return maxBonus;
    }

    public void setMaxBonus(Integer maxBonus) {
        this.maxBonus = maxBonus;
    }

    public Integer getCurrentMoney() {
        return currentMoney;
    }

    public void setCurrentMoney(Integer currentMoney) {
        this.currentMoney = currentMoney;
    }

    public void setCustomQuerySqlText(String customQuerySqlText) {
        this.customQuerySqlText = customQuerySqlText;
    }

    public String getCustomQuerySqlText() {
        return customQuerySqlText;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByPlanId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by plan_id asc";
            }else{
                this.orderStr = this.orderStr + ",plan_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by plan_id desc";
            }else{
                this.orderStr = this.orderStr + ",plan_id desc";
            }
        }
    }

    public void orderByFullIssueNo(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by full_issue_no asc";
            }else{
                this.orderStr = this.orderStr + ",full_issue_no asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by full_issue_no desc";
            }else{
                this.orderStr = this.orderStr + ",full_issue_no desc";
            }
        }
    }

    public void orderByOpenCode(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by open_code asc";
            }else{
                this.orderStr = this.orderStr + ",open_code asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by open_code desc";
            }else{
                this.orderStr = this.orderStr + ",open_code desc";
            }
        }
    }

    public void orderByStatus(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by status asc";
            }else{
                this.orderStr = this.orderStr + ",status asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by status desc";
            }else{
                this.orderStr = this.orderStr + ",status desc";
            }
        }
    }

    public void orderByCurrBetMultiple(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by curr_bet_multiple asc";
            }else{
                this.orderStr = this.orderStr + ",curr_bet_multiple asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by curr_bet_multiple desc";
            }else{
                this.orderStr = this.orderStr + ",curr_bet_multiple desc";
            }
        }
    }

    public void orderByInvestment(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by investment asc";
            }else{
                this.orderStr = this.orderStr + ",investment asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by investment desc";
            }else{
                this.orderStr = this.orderStr + ",investment desc";
            }
        }
    }

    public void orderByBetBonus(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by bet_bonus asc";
            }else{
                this.orderStr = this.orderStr + ",bet_bonus asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by bet_bonus desc";
            }else{
                this.orderStr = this.orderStr + ",bet_bonus desc";
            }
        }
    }

    public void orderByOpenTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by open_time asc";
            }else{
                this.orderStr = this.orderStr + ",open_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by open_time desc";
            }else{
                this.orderStr = this.orderStr + ",open_time desc";
            }
        }
    }

    public void orderByMinBonus(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by min_bonus asc";
            }else{
                this.orderStr = this.orderStr + ",min_bonus asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by min_bonus desc";
            }else{
                this.orderStr = this.orderStr + ",min_bonus desc";
            }
        }
    }

    public void orderByMaxBonus(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by max_bonus asc";
            }else{
                this.orderStr = this.orderStr + ",max_bonus asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by max_bonus desc";
            }else{
                this.orderStr = this.orderStr + ",max_bonus desc";
            }
        }
    }

    public void orderByCurrentMoney(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by current_money asc";
            }else{
                this.orderStr = this.orderStr + ",current_money asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by current_money desc";
            }else{
                this.orderStr = this.orderStr + ",current_money desc";
            }
        }
    }
}